
//#include <fstream>
//#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//using namespace std;
#define _CRT_SECURE_NO_WARNINGS
#include <string.h>
#include "tab1.h"

class GEN_TABLES{
public:
	GEN_TABLES(){ 
	//============== 
		Genpat512();
	}
	void Genpat512();
	void Genpat72();

}gen_tables;
//============================================


// tables in use
int tmax3[8]={0,4,4,6,4,6,6,7}; // minirow max pattern 
int tmin3[8]={0,1,1,3,1,3,3,7}; // minirow min pattern
int maxminirow[512]={
0,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,
4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,
4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,
4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,
4,4,4,6,4,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,
6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,

};

int tmax9[512]={//  max equivalent to a pattern for row1
00,0400,0400,0600,0400,0600,0600,0700,0400,0440,0440,0640,0440,0640,0640,0740,
0400,0440,0440,0640,0440,0640,0640,0740,0600,0640,0640,0660,0640,0660,0660,0760,
0400,0440,0440,0640,0440,0640,0640,0740,0600,0640,0640,0660,0640,0660,0660,0760,
0600,0640,0640,0660,0640,0660,0660,0760,0700,0740,0740,0760,0740,0760,0760,0770,
0400,0440,0440,0640,0440,0640,0640,0740,0440,0444,0444,0644,0444,0644,0644,0744,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0740,0744,0744,0764,0744,0764,0764,0774,
0400,0440,0440,0640,0440,0640,0640,0740,0440,0444,0444,0644,0444,0644,0644,0744,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0740,0744,0744,0764,0744,0764,0764,0774,
0600,0640,0640,0660,0640,0660,0660,0760,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0660,0664,0664,0666,0664,0666,0666,0766,0760,0764,0764,0766,0764,0766,0766,0776,
0400,0440,0440,0640,0440,0640,0640,0740,0440,0444,0444,0644,0444,0644,0644,0744,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0440,0444,0444,0644,0444,0644,0644,0744,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0740,0744,0744,0764,0744,0764,0764,0774,
0600,0640,0640,0660,0640,0660,0660,0760,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0660,0664,0664,0666,0664,0666,0666,0766,0760,0764,0764,0766,0764,0766,0766,0776,
0600,0640,0640,0660,0640,0660,0660,0760,0640,0644,0644,0664,0644,0664,0664,0764,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0640,0644,0644,0664,0644,0664,0664,0764,0660,0664,0664,0666,0664,0666,0666,0766,
0660,0664,0664,0666,0664,0666,0666,0766,0760,0764,0764,0766,0764,0766,0766,0776,
0700,0740,0740,0760,0740,0760,0760,0770,0740,0744,0744,0764,0744,0764,0764,0774,
0740,0744,0744,0764,0744,0764,0764,0774,0760,0764,0764,0766,0764,0766,0766,0776,
0740,0744,0744,0764,0744,0764,0764,0774,0760,0764,0764,0766,0764,0766,0766,0776,
0760,0764,0764,0766,0764,0766,0766,0776,0770,0774,0774,0776,0774,0776,0776,0777,

};




int tmin9[512]; // table to switch to minilex (in a box for magic40)
int with_hole[512]={
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,0,

};
word trowperms[512][1296]; // table of all row possible perms
word trowpermst[512][1296]; // table of all row possible perms
byte tcrossperms[64][72]; //  perms 2 minirows minlex 
byte tpermsminir1[8][6];  // perms to order box1 on minlex cross 
int tpermorder[1296][9]={
{0,1,2,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5,2,0,1,},{8,7,6,3,4,5,2,1,0,},{8,7,6,3,5,4,0,1,2,},{8,7,6,3,5,4,0,2,1,},
{8,7,6,3,5,4,1,0,2,},{8,7,6,3,5,4,1,2,0,},{8,7,6,3,5,4,2,0,1,},{8,7,6,3,5,4,2,1,0,},
{8,7,6,4,3,5,0,1,2,},{8,7,6,4,3,5,0,2,1,},{8,7,6,4,3,5,1,0,2,},{8,7,6,4,3,5,1,2,0,},
{8,7,6,4,3,5,2,0,1,},{8,7,6,4,3,5,2,1,0,},{8,7,6,4,5,3,0,1,2,},{8,7,6,4,5,3,0,2,1,},
{8,7,6,4,5,3,1,0,2,},{8,7,6,4,5,3,1,2,0,},{8,7,6,4,5,3,2,0,1,},{8,7,6,4,5,3,2,1,0,},
{8,7,6,5,3,4,0,1,2,},{8,7,6,5,3,4,0,2,1,},{8,7,6,5,3,4,1,0,2,},{8,7,6,5,3,4,1,2,0,},
{8,7,6,5,3,4,2,0,1,},{8,7,6,5,3,4,2,1,0,},{8,7,6,5,4,3,0,1,2,},{8,7,6,5,4,3,0,2,1,},
{8,7,6,5,4,3,1,0,2,},{8,7,6,5,4,3,1,2,0,},{8,7,6,5,4,3,2,0,1,},{8,7,6,5,4,3,2,1,0,},
};
byte tp_3_6_3_3[162][9]; //used in UA 4;6 search
//byte tmax9order[512][9]; //same, giving the permutation used 
byte permsb2_3[72][9];  // part of tpermorder where band 3 is first 0,1,2

void GEN_TABLES::Genpat512(){
//	cout <<"int tpermorder[1296][9]={"<<endl;
		// max minirow in a row
	for(int i=0;i<512;i++){
		word wmax=0;
		word wmax9=0,wj[3],wmin[3];
		// max minirow and max form for a row (tmax9)
		for(int j=0;j<3;j++) {
			word w=wj[j]=tmax3[(i>>(3*j) & 7)];
			wmin[j]=tmin3[(i>>(3*j) & 7)];
			if(w>wmax)wmax=w;
		}
		for(int j=0;j<2;j++) for(int k=j+1;k<3;k++){// sort the minirows
			if(wmin[j]>wmin[k]) {word temp=wmin[k]; wmin[k]=wmin[j]; wmin[j]=temp;}
//                    X est pas logique a priori
		}
		// revoir pour min, c'est special magic 50 pour min
		tmin9[i]=wmin[0] + (wmin[1]<<3) + (wmin[2]<<6) ; // for test <

		// buid trowperms [512][1296]
		for(int p=0;p<1296;p++){
			word & vv= trowperms[i][p];
			vv=0;
			for(int j=0;j<9;j++){
				int icol=tpermorder[p][j];
				if(i&(1<<(icol))) vv |= 1<<j;
			}
		}
		int iib[3];
//		cout <<with_hole[i]<<",";
//		if((i&31)==31) cout << endl;
//		cout <<0<<oct<<tmin9[i]<<dec<<",";
//		if((i&31)==31) cout << endl;
//		if((i&15)==15) cout << endl;
//		if((i&7)==7) cout << endl;


			 // build tp_3_6_3_3
		for(int ib=0;ib<3;ib++) // perm on bands 1 and 2 (as first band)
		for( iib[0]=0;iib[0]<6;iib[0]++) 
		for( iib[1]=0;iib[1]<3;iib[1]++)
		for( iib[2]=0;iib[2]<3;iib[2]++){
			byte * pp=tp_3_6_3_3[54*ib+9*iib[0]+3*iib[1]+iib[2]];
			for(int ipb=0;ipb<3;ipb++){
				int rbox=tperm3[ib][ipb];
				for(int j=0;j<3;j++){// location within a box
					int icol=3*rbox + ((ipb)?tperm3[iib[ipb]][j]: tperm6[iib[ipb]][j]);
					pp[3*ipb+j]=icol;
				}
	
			}
		}
			 // build permsb2-3
		for(int ib=0;ib<2;ib++) // perm on bands 1 and 2 (as first band)
		for(int i=0;i<6;i++) for(int j=0;j<6;j++){
			byte * pp=permsb2_3[36*ib+6*i+j];
			 for(int k=0;k<3;k++){
				pp[k]=  3*ib+tperm6[i][k];
				pp[3+k]=3*(1-ib)+tperm6[j][k];
				pp[6+k]=6+k; // band 3 never touched 
			 }
		 }

	}

 //	cout <<endl<<"};"<<endl;

}
void GEN_TABLES::Genpat72(){
	// build tcrossperms[64][72]
	for(int i=0;i<64;i++){
		int iib[2];
		for(int ib=1;ib<3;ib++) //select box order
			for( iib[0] =0;iib[0]<6;iib[0]++)
				for(iib[1]=0;iib[1]<6;iib[1]++){
					int permnumber=36*(ib-1)+6*iib[0]+iib[1];
					byte & vv= tcrossperms[i][permnumber];
					vv=0;
					int ib2=3-ib;
					for(int j=0;j<3;j++){// location within a box
							int j1= 3*(ib-1)+tperm6[iib[0]][j],
							    j2= 3*(ib2-1)+tperm6[iib[1]][j];
							if(i&(1<<j1)) vv |= 1<<j;
							if(i&(1<<j2)) vv |= 1<<(3+j);
					}
				}

	}// end i
	// build also the small table to order box 1 in crossing magic 40
	// this is a per 3 columns for the minirow value
	for(int i=0;i<8;i++){
		for(int ip=0;ip<6;ip++){
			byte & vv= tpermsminir1[i][ip];
			vv=0;
			for(int j=0;j<3;j++){ 
				if(i&(1<<tperm6[ip][j])) vv |= 1<<j;
			}
		}
	}
//	Buildtmagic40();


}

word tmagicbox1[12]={
	0,1,3,7,012,021,033,035,037,0117,0124,0125
};
// this is optical left to right must be reversed for use 
word tmagic40[50][5]={// serg's 40 magic crossing patterns (no valid puzzle)
	{0117, 0007, 0007, 0111, 0111}, //128
	{0007, 0007, 0117, 0111, 0111}, //129
	{0001, 0007, 0117, 0111, 0117}, //130
	{0021, 0007, 0007, 0111, 0111}, //131
	{0007, 0007, 0117, 0007, 0007}, //132 
	{0001, 0070, 0070, 0007, 0007}, //133 
	{0001, 0111, 0111, 0007, 0007}, //134
	{0001, 0001, 0030, 0002, 0002}, //135
	{0007, 0007, 0007, 0777, 0777}, //137 
	{0000, 0001, 0030, 0012, 0012}, //121  
	{0000, 0007, 0337, 0007, 0007}, //122 
	{0000, 0333, 0777, 0007, 0007}, //123     
	{0000, 0007, 0117, 0007, 0077}, //124
	{0000, 0111, 0333, 0007, 0077}, //125     
	{0000, 0117, 0117, 0007, 0007}, //126
	{0017, 0007, 0007, 0007, 0000}, //102    
	{0007, 0007, 0117, 0077, 0000}, //104
	{0012, 0100, 0100, 0004, 0000}, //108     
	{0003, 0010, 0010, 0007, 0000}, //109
	{0001, 0111, 0777, 0002, 0000}, //110     
	{0001, 0007, 0337, 0002, 0000}, //111
	{0001, 0070, 0171, 0002, 0000}, //112     
	{0001, 0117, 0117, 0002, 0000}, //113
	{0001, 0333, 0333, 0002, 0000}, //114    
	{0001, 0001, 0030, 0012, 0000}, //115
	{0001, 0001, 0030, 0007, 0000}, //116    
	{0001, 0111, 0111, 0077, 0000}, //118
	{0001, 0070, 0070, 0077, 0000}, //119
	{0037, 0007, 0007, 0000, 0000}, //032  
	{0117, 0777, 0777, 0000, 0000}, //138
	{0124, 0777, 0777, 0000, 0000}, //139  
	{0000, 0000, 0777, 0007, 0077}, //098
	{0000, 0000, 0777, 0111, 0117}, //099  
	{0000, 0000, 0333, 0012, 0012}, //100
	{0012, 0111, 0000, 0007, 0000}, //090  
	{0001, 0333, 0000, 0077, 0000}, //092
	{0035, 0111, 0000, 0000, 0000}, //140  
	{0033, 0111, 0000, 0000, 0000}, //141
	{0000, 0000, 0777, 0000, 0777}, //136  
	{0125, 0000, 0000, 0000, 0000}, //004
	//============ added sub patterns not yet in use
	{0000, 0070, 0171, 0002, 0000}, //112   be sure to catch missing 1 box 1   
	{0000, 0001, 0030, 0012, 0000}, //115
	{0000, 0001, 0030, 0002, 0002}, //135
	{0000, 0001, 0030, 0007, 0000}, //116    
	{0013, 0070, 0070, 0000, 0000}, //032  pattern reversing rows 2 3
	{0016, 0070, 0070, 0000, 0000}, //032
	{0000, 0000, 0122, 0007, 0077}, //124
	{0000, 0000, 0122, 0111, 0117}, //130
	{0000, 0000, 0122, 0007, 0007}, //132 
	{0000, 0000, 0122, 0077, 0000}, //104

};


byte patnumber[50]={
	128,129,130,131,132,133,134,135,137,121,
	122,123,124,125,126,102,104,108,109,110,
	111,112,113,114,115,116,118,119, 32,138,
	139, 98, 99,100, 90, 92,140,141,136,  4,
	112,115,135,116, 32, 32,124,130,132,104   

};
byte boxes_5 [9][5]={  // crossing boxes 9 starts
	{0,1,2,3,6}, {1,0,2,4,7}, {2,0,1,5,8},
	{3,4,5,0,6}, {4,3,5,1,7}, {5,3,4,2,8},
	{6,7,8,0,3}, {7,6,8,1,4}, {8,6,7,2,5}
};


int tpat40_sort[50][3] ={// minrow; mincol; pat id
 { 0777000000, 0774774774, 137}, { 060400000, 0220440000, 121},
 { 04400000, 0744740740, 110}, { 04400000, 0774600600, 111},
 { 04400000, 0404770400, 112}, { 04400000, 0774440440, 113},
 { 04400000, 0664660660, 114}, { 0204400000, 044600000, 115},
 { 044600000, 04440000, 135}, { 044600000, 0404400400, 116},
 { 0220440000, 0600600600, 100}, { 06440000, 0404404400, 109},
 { 04770000, 0604600600, 119}, { 04770000, 0444440440, 133},
 { 0772004000, 0772004000, 131}, { 0777004000, 0406404404, 102},
 { 06006000, 0406406400, 141}, { 0777006000, 06006004, 32},
 { 0770400400, 0640640640, 124}, { 0770400400, 0700700700, 99},
 { 0774400400, 0774400400, 130}, { 0777400400, 0444444444, 132},
 { 0777400400, 0604604604, 104}, { 0777400400, 0774004004, 129},
 { 02004400, 02004440, 108}, { 0402404400, 0402404400, 90},
 { 0405406400, 06002004, 140}, { 0770600600, 0440440440, 122},
 { 0604600600, 0444440440, 118}, { 0604600600, 0604600600, 92},
 { 0700700700, 0640640640, 98}, { 0700700700, 0700700700, 136},
 { 0440440440, 0760760760, 123}, { 0440440440, 0770440440, 126},
 { 0444440440, 0444440440, 134}, { 0640640640, 0640640640, 125},
 { 07004004, 0777774774, 138}, { 0777004004, 0777004004, 128},
 { 01002004, 0771772774, 139}, { 05002004, 05002004, 4},
 };


char * t16[416]={
	"6789123789123456","6789123789123465","6789123789123564","6789123789132465",
	"6789123789132546","6789123789132564","6789123789231564","6789123789231645",
	"6789123798132465","6789123798132546","6789123798132564","6789123798213564",
	"6789123798213654","6789123798231564","6789123798231645","6789123897231564",
	"6789123897231645","6789132789123546","6789132789132546","6789132789132564",
	"6789132789213456","6789132789213645","6789132789213654","6789132789231546",
	"6789132789231564","6789132879231564","6789231789123645","6789231789132546",
	"6789231789231564","6789231789312456","6789231798213645","7189236689237145",
	"7189236689237154","7189236689237415","7189236689237451","7189236689237514",
	"7189236689237541","7189236689273145","7189236689273154","7189236689273415",
	"7189236689273451","7189236689273514","7189236689273541","7189236689327145",
	"7189236689327154","7189236689327415","7189236689327451","7189236689327514",
	"7189236689327541","7189236689372145","7189236689372154","7189236689372415",
	"7189236689372451","7189236689372514","7189236689372541","7189236689723145",
	"7189236689723154","7189236689723415","7189236689723514","7189236689723541",
	"7189236689732145","7189236689732154","7189236689732415","7189236689732514",
	"7189236689732541","7189236698237145","7189236698237154","7189236698237415",
	"7189236698237514","7189236698237541","7189236698273145","7189236698273154",
	"7189236698273415","7189236698273514","7189236698273541","7189236698327145",
	"7189236698327154","7189236698327415","7189236698327541","7189236698372145",
	"7189236698372154","7189236698372415","7189236698372514","7189236698372541",
	"7189236698723145","7189236698723154","7189236698723415","7189236698723514",
	"7189236698732145","7189236698732154","7189236698732415","7189236698732514",
	"7189236869237145","7189236869237514","7189236869273145","7189236869273154",
	"7189236869273415","7189236869273514","7189236869327154","7189236869327415",
	"7189236869327514","7189236869372145","7189236869372154","7189236869372415",
	"7189236869372514","7189236869723145","7189236869723154","7189236869723514",
	"7189236869732145","7189236869732154","7189236896237145","7189236896237154",
	"7189236896237514","7189236896273145","7189236896273154","7189236896273514",
	"7189236896327145","7189236896327154","7189236896327514","7189236896372145",
	"7189236896372154","7189236896372514","7189236896723154","7189236896723514",
	"7189236896732154","7189236896732514","7189236968237154","7189236968237514",
	"7189236968273514","7189236968327154","7189236968327514","7189236968372154",
	"7189236968372514","7189236968723154","7189236968732154","7189236986237154",
	"7189236986273154","7189236986327154","7189236986372154","7189263689237145",
	"7189263689237415","7189263689237451","7189263689237514","7189263689273154",
	"7189263689273415","7189263689273451","7189263689273514","7189263689273541",
	"7189263689327154","7189263689327415","7189263689327514","7189263689327541",
	"7189263689372145","7189263689372154","7189263689372415","7189263689372451",
	"7189263689372514","7189263689723145","7189263689723154","7189263689723451",
	"7189263689732145","7189263689732154","7189263689732415","7189263689732451",
	"7189263689732514","7189263689732541","7189263698237154","7189263698237415",
	"7189263698237451","7189263698237514","7189263698273145","7189263698273415",
	"7189263698273451","7189263698273514","7189263698327145","7189263698327154",
	"7189263698327415","7189263698327451","7189263698327514","7189263698372154",
	"7189263698372415","7189263698372514","7189263698372541","7189263698732145",
	"7189263698732154","7189263698732451","7189263869237154","7189263869237415",
	"7189263869237514","7189263869273451","7189263869327415","7189263869327451",
	"7189263869327514","7189263869372145","7189263869372154","7189263869372514",
	"7189263896237145","7189263896237154","7189263896237451","7189263896327145",
	"7189263896327154","7189263896327415","7189263896327451","7189263896327514",
	"7189263896327541","7189263896372145","7189263896372154","7189263896372451",
	"7189263968327145","7189263968327154","7189263968327415","7189263968327514",
	"7189263968327541","7189263968372145","7189263986327145","7189263986327154",
	"7189263986327451","7189326689237451","7189326689237514","7189326689237541",
	"7189326689273145","7189326689273451","7189326689273541","7189326689327154",
	"7189326689327451","7189326689327541","7189326689372415","7189326689372541",
	"7189326689723145","7189326689723415","7189326689732145","7189326689732415",
	"7189326689732514","7189326689732541","7189326698237145","7189326698237541",
	"7189326698273514","7189326698273541","7189326698732415","7189326869372514",
	"7189623689237145","7189623689237154","7189623689273145","7189623689273154",
	"7189623689273541","7189623689327145","7189623689327154","7189623689372145",
	"7189623689372154","7189623689372514","7189623689723145","7189623689723154",
	"7189623689723415","7189623689723451","7189623689723514","7189623689723541",
	"7189623689732145","7189623689732154","7189623689732415","7189623689732451",
	"7189623689732514","7189623689732541","7189623698237145","7189623698237154",
	"7189623698237541","7189623698273145","7189623698273154","7189623698327145",
	"7189623698327154","7189623698327514","7189623698372145","7189623698372154",
	"7189623698732145","7189623698732154","7189623698732415","7189623698732514",
	"7189623698732541","7189623869237145","7189623869273145","7189623869273154",
	"7189623869273451","7189623869327154","7189623869372145","7189623869372154",
	"7189623896237145","7189623896237154","7189623896237415","7189623896237451",
	"7189623896237514","7189623896237541","7189623896327145","7189623896327154",
	"7189623896327415","7189623896327451","7189623896327514","7189623896372145",
	"7189623896372154","7189623896372451","7189623968327145","7189623968327154",
	"7189623968327415","7189623968372145","7189623968372154","7189623986327145",
	"7189623986327154","7189623986327415","7189623986327451","7189623986327514",
	"7189623986327541","7189632689237145","7189632689273145","7189632689273154",
	"7189632689273514","7189632689327154","7189632689372145","7189632689372154",
	"7189632689723145","7189632689723514","7189632689732145","7189632689732154",
	"7189632689732514","7189632689732541","7189632698237145","7189632698237154",
	"7189632698237514","7189632698273145","7189632698327145","7189632698327154",
	"7189632698327541","7189632698372154","7189632698732145","7189632698732514",
	"7189632869273145","7189632869372145","7189632896237145","7189632896237415",
	"7189632896327145","7189632896327154","7189632896327451","7189632896327541",
	"7189632896372145","7189632896372154","7189632896372451","7189632968327145",
	"7189632968327154","7189632968327451","7189632986327145","7289163689173452",
	"7289163689713254","7289163698137425","7289163698137524","7289163698317254",
	"7289163698317524","7289163698713254","7289163869713245","7289163869731245",
	"7289163869731524","7289163896317245","7289163896731524","7289613689173245",
	"7289613689713245","7289613689713254","7289613698137254","7289613698317245",
	"7289613698317254","7289613698713245","7289613869713245","7289613869731245",
	"7289613869731254","7289613896137245","7289613896137254","7289613896317245",
	"7289613896317425","7289613896731245","7289613896731254","7289613968137245",
	"7289613968137254","7289613968731245","7289613986137245","7289631689173245",
	"7289631689713254","7289631698317254","7289631869713245","7289631869713254",
	"7289631869731245","7289631869731254","7289631896137245","7289631896137254",
	"7289631896137425","7289631896317245","7289631896317254","7289631896731245",
	"7289631968137254","7289631968731245","7289631986137245","7389612896127354",
	"7389612896172354","7389612896271354","7389612896721354","7389621896217354",
	"7893612986217354","7289631968731254","7289631986137254","7893612896127345",
	"7893612896127354","7893612896217354","7389612896127345","7389612896172345",
	"7389612896271345","7389612896217345","7389612896217354","7389612896712354",
	"7389612986172354","7389612986217354","7389621896127345","7389621986127354",
};


char * t44gang[44]={
"123456789456789123789123456","123456789456789123789123465","123456789456789123789123564","123456789456789123789132465",
"123456789456789123789132546","123456789456789123789132564","123456789456789123789231564","123456789456789123789231645",
"123456789456789123798132546","123456789456789123798213564","123456789456789123798213654","123456789456789123798231564",
"123456789456789123798231645","123456789456789123897231564","123456789456789132789123546","123456789456789132789213456",
"123456789456789132789213645","123456789456789132789213654","123456789456789132789231546","123456789456789231789123645",
"123456789456789231789312456","123456789457189236689273145","123456789457189236689273154","123456789457189236689273514",
"123456789457189236689372145","123456789457189236689372154","123456789457189236698237514","123456789457189236698723145",
"123456789457189236698732145","123456789457189236869372145","123456789457189263689273154","123456789457189263689723154",
"123456789457189263689732154","123456789457189263968327145","123456789457189263968327514","123456789457189263968372145",
"123456789457189263986327145","123456789457189263986327154","123456789457189623689723145","123456789457189623689723154",
"123456789457189623689723514","123456789457189632698732514","123456789457189632896372154","123456789457289631896137254",
};

word t416to44[416]={
0,1,2,3,4,5,6,7,3,8,8,9,10,11,12,13,6,14,4,5,15,16,17,18,12,9,
19,17,7,20,10,6,5,6,5,12,12,21,22,21,22,23,23,16,8,16,8,5,5,24,25,24,
25,23,23,16,5,16,8,8,21,8,21,9,9,18,8,18,26,26,10,23,10,12,12,9,9,9,
22,23,23,23,7,7,27,12,27,26,28,5,28,22,12,27,9,21,9,10,21,23,28,29,24,29,
23,12,6,18,23,16,12,16,27,9,21,10,23,21,28,29,24,23,6,18,16,9,8,26,12,9,
22,23,7,12,5,5,22,8,25,12,12,18,6,30,26,30,28,28,8,16,5,5,24,25,24,25,
23,17,31,31,9,32,9,32,21,21,11,9,11,24,27,27,21,27,11,11,11,11,25,21,21,12,
12,12,21,21,10,9,21,18,21,23,22,24,9,12,27,24,24,21,21,21,21,26,26,11,24,24,
33,29,33,34,34,35,36,37,37,5,7,7,12,5,7,3,3,5,27,12,5,5,27,27,12,12,
10,23,23,23,23,10,7,5,22,31,22,5,3,21,8,9,38,39,38,39,40,40,23,37,23,37,
24,24,12,9,24,27,27,9,8,21,21,12,23,23,23,35,35,23,34,32,32,5,24,9,28,32,
28,32,34,34,22,31,22,31,22,21,27,27,24,37,24,35,23,40,39,40,39,38,38,12,21,26,
21,8,9,32,37,36,23,37,24,24,17,5,26,16,5,12,27,28,38,41,24,29,17,17,38,26,
26,28,37,42,42,26,27,27,31,20,41,25,33,33,33,35,32,24,33,24,13,41,26,40,24,24,
36,21,31,16,21,31,25,40,41,16,11,18,10,10,30,35,42,24,27,27,21,16,26,43,42,22,
25,6,4,30,18,5,17,16,8,8,3,4,15,0,1,3,2,14,19,14,4,15,17,4,5,1,
};


char *gtypes[44] = {
   "123456789123456789123456789",
   "123456789123456789123457689",
   "123456789123456789124357689",
   "123456789123456789124378569",
   "123456789123456789147258369",
   "123456789123457689123458679",
   "123456789123457689123468579",
   "123456789123457689124356789",
   "123456789123457689124358679",
   "123456789123457689124367589",
   "123456789123457689124368579",
   "123456789123457689124389567",
   "123456789123457689126345789",
   "123456789123457689126347589",
   "123456789123457689126348579",
   "123456789123457689145267389",
   "123456789123457689145268379",
   "123456789123457689146258379",
   "123456789123457689148259367",
   "123456789124357689125348679",
   "123456789124357689125367489",
   "123456789124357689125368479",
   "123456789124357689125378469",
   "123456789124357689126358479",
   "123456789124357689126378459",
   "123456789124357689126389457",
   "123456789124357689128345679",
   "123456789124357689128356479",
   "123456789124357689128359467",
   "123456789124357689134258679",
   "123456789124357689134268579",
   "123456789124357689135268479",
   "123456789124357689135278469",
   "123456789124357689136258479",
   "123456789124357689136278459",
   "123456789124357689137268459",
   "123456789124357689138259467",
   "123456789124357689138269457",
   "123456789124357689158267349",
   "123456789124378569129356478",
   "123456789124378569135279468",
   "123456789124378569137245689",
   "123456789124378569157268349",
   "123456789147258369159267348",
};

char *ggrids[44] = {
   "147258369258369147369147258471582693683491725592673481714925836936814572825736914",
   "147268359258349176369157248481592763673481925592673481814925637736814592925736814",
   "147368259269157438358249176471582963685493712923716845734925681812634597596871324",
   "147359286258167439369248175481932657673485912925716348794523861812674593536891724",
   "148269753259347186367158429471692835592483617683715942724836591916524378835971264",
   "147256389258379146369148257471562893693481725582793461714625938835914672926837514",
   "147256389258349167369178245471562893593481726682793451714625938835914672926837514",
   "147358269259176438368249157431682975875493612926715843694527381512834796783961524",
   "147356289258179436369248157471832965683495712925617348894523671512764893736981524",
   "147358269259176438368249175481762953695483712723915846934527681812634597576891324",
   "147356289268179435359248167471832956683495712925617348894523671512764893736981524",
   "147358296268179435359246187481792653675483912923615748834927561512864379796531824",
   "147258639259376148368149257471562893693481725582793461914825376735614982826937514",
   "147258639259346178368179245481962753573481926692537481814623597935714862726895314",
   "147258639259346187368179245471562893593481726682793451714925368835614972926837514",
   "148279563259346178367158429471682935982435617536917842624593781715824396893761254",
   "148279563257346189369158427471692835536487912982513746724835691615924378893761254",
   "147259683269348157358176429481762935592483716673915248824597361715634892936821574",
   "147256893268349157359178426431982675572463918896715342624897531715634289983521764",
   "147236589258479136369158247471923865625841973983765412534612798796584321812397654",
   "147238569259476138368159274471623985685941327932785416714562893896314752523897641",
   "147236589268459137359178264481623975675941328932785416714562893896314752523897641",
   "147236589258479136369158274471923865685741923932685417514362798793814652826597341",
   "147238659268459137359176284481623975675941328932785416714562893593814762826397541",
   "147239685258476139369158274471823956695741328832965417714592863583614792926387541",
   "147238695268459137359176284481923576675841329932765418714592863893614752526387941",
   "147236859258479136369158247471923685625841793983765412534612978796384521812597364",
   "147236859268459137359178264481623795675941328932785416714562983593814672826397541",
   "147239856269458137358176294481923765675841329932765418714592683893614572526387941",
   "147256389268139457359478126481723695695841732723965841814692573572314968936587214",
   "147256389258139467369478125481723956695841732723965841814692573572314698936587214",
   "147236589258179364369458127481923756572641938693785412714562893936814275825397641",
   "147236589268159374359478126481623957572941638693785412714362895925814763836597241",
   "147238659259176384368459127481923576625741938793685412514862793972314865836597241",
   "147239685269158374358476129481923567625741938793685412814562793972314856536897241",
   "147256389258139764369478125481923576625741938793685412514362897972814653836597241",
   "147239856258176394369458127471923568582641739693785412714362985925814673836597241",
   "147236895258179364369458127481623579675941238923785416714562983896314752532897641",
   "147238569268459173359176824471923685685741392932865417814592736723614958596387241",
   "147235968259486137368179254471523689695841723832967415514392876783614592926758341",
   "147236598269185374358479126471823965625941837893567412714352689982614753536798241",
   "147286359258139746369475128471923685625841973983567412534612897896754231712398564",
   "147236589258479163369185724471523698695841237832967415514392876783614952926758341",
   "148729563269453178357186924471832659592641387836975412714368295985214736623597841",
};